const mongoose = require('mongoose');
const config = require('./config');

mongoose.connect(config.dbUrl, {useCreateIndex: true, useNewUrlParser: true, useUnifiedTopology: true}, (err) => {
    if (err) {
        console.log('mongoose connect err :', err);
        return;
    }
    console.log('mongoose connect success !');
});

module.exports = mongoose;